﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UnityEngine;

class StartLevelCommand : Controller
{
    public override void Execute(object data)
    {
        Debug.Log("start level");

        StartLevelArgs e = data as StartLevelArgs;

        //第一步 设置GameModel数据
        GameModel gModel = GetModel<GameModel>();
        gModel.StartLevel(e.LevelIndex);

        //第二步 设置RoundModel数据
        RoundModel rModel = GetModel<RoundModel>();
        rModel.LoadLevel(gModel.PlayLevel);
        
        //进入游戏
        Game.Instance.LoadScene(3);
    }
}